Skip to content

config: one local.conf for every operator choice, not endless flags - #8

Merged
daniel-rossier merged 1 commit into
mainfrom
spear-local-conf
Nov 14, 2026
Merged

daniel-rossier merged 1 commit into
mainfrom
spear-local-conf

Conversation

@daniel-rossier

Copy link
Copy Markdown
Contributor

What

A deployment's settings were scattered across machine.env (generated), engagement.env, ambient registry variables, and a growing list of build-tiered.sh flags. This collapses them into one file, client/local.conf: every SPEAR_* choice in one place, documented, the ones not made left commented.

Changes

  • client/local.conf.example (renamed from machine.env.example) — the full menu: deployment paths, image-tier choices, and push registries, grouped and commented.
  • Consumers source local.conf, falling back to machine.env so a host configured the old way keeps working: spear-chat, spear-corpus, build.sh, build-tiered.sh, spear-image.
  • build-tiered.sh reads each former flag from the environment (SPEAR_COMMONS, SPEAR_ENTITY, SPEAR_BAKE, SPEAR_PROJECT_TREES, SPEAR_FROM_BASE, SPEAR_STANDARDS_STORE, SPEAR_LICENSED, SPEAR_KNOWLEDGE, SPEAR_TAG); a flag still overrides it. Once local.conf names the commons and entity, spear-image build base alone is enough.
  • spear-configure writes local.conf, migrates an existing machine.env's hand-made settings, and seeds the commented menu from the example on a first run.
  • .gitignore ignores local.conf/.bak.
  • The tracked template names no organisation or build system (generic acme / registry.example.com); the real, untracked local.conf on a host carries those.

Tests

  • test_launcher_environment: updated for the local.conf-then-machine.env sourcing, plus a precedence test (local.conf wins) and gitignore coverage for local.conf.
  • Full suite: identical to main — the 5 pre-existing failures (stale test_spear_image assertion, test_environment_namespace allowlist, and public_boundary offenders from earlier merges) are unchanged; this branch adds none, and local.conf.example is not among the boundary offenders.

A deployment's settings were scattered across machine.env (generated),
engagement.env, ambient registry variables, and a growing list of
build-tiered.sh flags. Collapse them into a single file, client/local.conf:
every SPEAR_* choice in one place, documented, the ones not made left
commented.

- local.conf.example (was machine.env.example) is the full menu: deployment
  paths, the image-tier choices, and the push registries, grouped and
  commented.
- Every consumer -- spear-chat, spear-corpus, build.sh, build-tiered.sh and
  spear-image -- sources local.conf, falling back to machine.env so a host
  configured the old way keeps working.
- build-tiered.sh reads each former flag from the environment (SPEAR_COMMONS,
  SPEAR_ENTITY, SPEAR_BAKE, SPEAR_PROJECT_TREES, ...); a flag still overrides
  it, so `spear-image build base` alone works once local.conf names the
  commons and entity.
- spear-configure writes local.conf, migrating an existing machine.env's
  hand-made settings and seeding the commented menu from the example on a
  first run.
- The tracked template names no organisation or build system; the real,
  untracked local.conf on a host carries those.
@daniel-rossier
daniel-rossier merged commit 673ca0e into main Nov 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant